/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main_package;

import java.sql.SQLException;

public class Login {
    
    static int VACIO = 0;
    static int SECRETARIO = 1;
    static int EXPERTO = 2;
    static int ADJUNTO = 3;
    static int COORDINADOR = 4;
    private Consultas consultas;
    
    public Login(Consultas cons){
        consultas=cons;
    }
    
    public Usuario verificar(String username, String password) throws SQLException {        
        Usuario user = consultas.getUsuario(username);
        if(user!=null && user.getpassword().equals(password)){
            return user;
        }
        else 
            return null;
    }
    
}
